/*
 * @file    :drv.h
 * @author  :LingFengLu
 * @date    :2023-06-06
 */

#ifndef _DRV_H_
#define _DRV_H_
#include <stdio.h>
#include <string.h>
#include "rf_device_it.h"
#include "ble_const.h"
#include "bluenrg_lp_stack.h"
#include "rf_driver_hal_power_manager.h"
#include "rf_driver_hal_vtimer.h"
#include "bluenrg_lp_evb_com.h"
#include "sensor.h"

#include "gatt_db.h"
#include "bleplat.h"
#include "nvm_db.h"
#include "OTA_btl.h"
#include "pka_manager.h"
#include "rng_manager.h"
#include "aes_manager.h"
#include "ble_controller.h"
#include "ble.h"
#include "drv_timer.h"
#include "drv_gpio.h"
#include "log.h"
#include "global.h"
#include "log.h"
#include "drv_gpio.h"
#include "drv_flash.h"
#include "drv_wdog.h"
#include "drv_uart.h"
#include "drv_adc.h"
#include "drv_timer.h"

//Constant definition    宏定义
#define Drv_EnableInterrupt()		__enable_irq()  
#define Drv_DisableInterrupt()		__disable_irq()

//Type definition    类型定义
typedef enum 
{
	DRV_PARAM_WORK_STATE = 0,
	DRV_PARAM_RESET_FLAG,
	DRV_COUNT_PARAM
} drv_param;

typedef enum 
{
	DRV_WORK_STATE_WAIT = 0,
	DRV_WORK_STATE_FINISH,
	DRV_COUNT_WORK_STATE
} drv_work_state;
//Function declaration    函数申明
void Drv_Init(void);
uint Drv_SetConfig
(
	uint ui_Parameter,
	uint8 *u8p_Value,
	uint ui_Length
);
uint Drv_GetConfig
(
	uint ui_Parameter,
	uint8 *u8p_Value,
	uint *uip_Length
);
void Drv_SystemPorcessAction(void);
void Drv_Sleep(void);
uint32 Drv_Random(void);
void Drv_DelayMs
(
    uint16 u16_Delay
);
void Drv_SoftRest(void);
//Golbal variable declaration   全局变量申明










#endif

